<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
	<style>
		.box{
			width:100px; height:100px; background:red;
		}
		
	</style>
 </head>
 <body>
		<div id="box" class="box"></div>
 </body>
</html>
<script>
	//获取元素
	var oBox = document.getElementById('box');

	//鼠标移入
	oBox.onmouseover = function(){
		//alert('鼠标移入了');
		oBox.style.background = 'green';
	}
</script>
